







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Randomly shuffles the items in a collection, yielding a new collection.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static T[] RandomShuffle<T>( IEnumerable<T> collection ) |
Visual Basic (Declaration) |
---|
Public Shared Function RandomShuffle(Of T) ( _ collection As IEnumerable(Of T) _ ) As T() |
Visual C++ |
---|
public: generic<typename T> static array<T>^ RandomShuffle ( IEnumerable<T>^ collection ) |
Parameters
- collection
- IEnumerable<(Of <T>)>
The collection to shuffle.
Return Value
An array with the same size and items as collection, but the items in a randomly chosen order.
Type Parameters
- T
- The type of the items in the collection.
See Also
Algorithms Class
Wintellect.PowerCollections Namespace